<script>
	export default {
		globalData: {  
		            text: 'text',
					user: {},
					token: ''
		},
		onLaunch: function() {
			// console.log('App Launch')
		},
		onShow: function() {
			// console.log('App Show')
		},
		onHide: function() {
			// console.log('App Hide')
		},
		methods:{
			 isEmail(source) {
					if(source.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1){
						globalEmail = source;
						//console.log(source);
						return true;
					}else{
						uni.showModal({
							title: '电子邮箱格式不正确',
							showCancel: false
							
						})
						return false;
					}
			},
			//定时清理token
			clearToken(){
				getApp().globalData.token = ''
			}
		}
	}
</script>

<style>
	/*每个页面公共css */
	@import url("./common/uni.css");

</style>
